Fixes the build on freebsd.
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
add_c_compiler_flag("-Wno-error=tautological-compare" SUPPORTED_COMPILER_FLAGS)
endif()
+ # Needed by src/python/CMakeLists.txt
+ check_c_compiler_flag("-Wno-cast-function-type" WITH_WNO_CAST_FUNCTION_TYPE)
+
# Unset CMAKE_REQUIRED_FLAGS
unset(CMAKE_REQUIRED_FLAGS)
endif()
add_subdirectory(python2)
add_subdirectory(python3)
-set_source_files_properties(pypamtest.c
- DIRECTORY python2 python3
- PROPERTIES COMPILE_OPTIONS "-Wno-cast-function-type")
+if (WITH_WNO_CAST_FUNCTION_TYPE)
+ set_source_files_properties(pypamtest.c
+ DIRECTORY python2 python3
+ PROPERTIES COMPILE_OPTIONS "-Wno-cast-function-type")
+endif()