Changeset: 78e00ea85f2f for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=78e00ea85f2f
Modified Files:
cmake/monetdb-defines.cmake
common/options/CMakeLists.txt
testing/CMakeLists.txt
Branch: default
Log Message:
Use find_path to check for getopt.h: we need the path on Windows.
diffs (39 lines):
diff --git a/cmake/monetdb-defines.cmake b/cmake/monetdb-defines.cmake
--- a/cmake/monetdb-defines.cmake
+++ b/cmake/monetdb-defines.cmake
@@ -14,7 +14,8 @@ function(monetdb_configure_defines)
check_include_file("dispatch/dispatch.h" HAVE_DISPATCH_DISPATCH_H)
check_include_file("dlfcn.h" HAVE_DLFCN_H)
check_include_file("fcntl.h" HAVE_FCNTL_H)
- check_include_file("getopt.h" HAVE_GETOPT_H)
+# use find_path for getop.h since we need the path on Windows
+ find_path(HAVE_GETOPT_H "getopt.h")
check_include_file("io.h" HAVE_IO_H)
check_include_file("kvm.h" HAVE_KVM_H)
check_include_file("libgen.h" HAVE_LIBGEN_H)
diff --git a/common/options/CMakeLists.txt b/common/options/CMakeLists.txt
--- a/common/options/CMakeLists.txt
+++ b/common/options/CMakeLists.txt
@@ -20,6 +20,8 @@ target_sources(moptions
${moptions_public_headers})
target_include_directories(moptions
+ PRIVATE
+ $<$<PLATFORM_ID:Windows>:${HAVE_GETOPT_H}>
PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/monetdb>)
diff --git a/testing/CMakeLists.txt b/testing/CMakeLists.txt
--- a/testing/CMakeLists.txt
+++ b/testing/CMakeLists.txt
@@ -89,6 +89,10 @@ endif()
add_executable(Mdiff)
+target_include_directories(Mdiff
+ PRIVATE
+ $<$<PLATFORM_ID:Windows>:${HAVE_GETOPT_H}>)
+
target_sources(Mdiff
PRIVATE
difflib.c
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list