diff options
-rw-r--r-- | Modules/CheckTypeSize.cmake | 2 | ||||
-rw-r--r-- | Modules/FindJNI.cmake | 1 | ||||
-rw-r--r-- | Tests/InterfaceLibrary/CMakeLists.txt | 13 | ||||
-rw-r--r-- | Tests/InterfaceLibrary/map_config.cpp | 15 |
4 files changed, 31 insertions, 0 deletions
diff --git a/Modules/CheckTypeSize.cmake b/Modules/CheckTypeSize.cmake index a9efae4..ec28d8b 100644 --- a/Modules/CheckTypeSize.cmake +++ b/Modules/CheckTypeSize.cmake @@ -222,6 +222,8 @@ macro(CHECK_TYPE_SIZE TYPE VARIABLE) check_include_file(stdint.h HAVE_STDINT_H) check_include_file(stddef.h HAVE_STDDEF_H) endif() + unset(_CHECK_TYPE_SIZE_BUILTIN_TYPES_ONLY) + unset(_CHECK_TYPE_SIZE_LANGUAGE) # Compute or load the size or size map. set(${VARIABLE}_KEYS) diff --git a/Modules/FindJNI.cmake b/Modules/FindJNI.cmake index 29a247d..f1cb57e 100644 --- a/Modules/FindJNI.cmake +++ b/Modules/FindJNI.cmake @@ -238,6 +238,7 @@ find_path(JAVA_INCLUDE_PATH jni.h find_path(JAVA_INCLUDE_PATH2 jni_md.h ${JAVA_INCLUDE_PATH} + ${JAVA_INCLUDE_PATH}/darwin ${JAVA_INCLUDE_PATH}/win32 ${JAVA_INCLUDE_PATH}/linux ${JAVA_INCLUDE_PATH}/freebsd diff --git a/Tests/InterfaceLibrary/CMakeLists.txt b/Tests/InterfaceLibrary/CMakeLists.txt index b396eb6..81b34e6 100644 --- a/Tests/InterfaceLibrary/CMakeLists.txt +++ b/Tests/InterfaceLibrary/CMakeLists.txt @@ -29,3 +29,16 @@ target_link_libraries(iface_whitelist INTERFACE $<$<BOOL:$<TARGET_PROPERTY:CUSTO add_executable(exec_whitelist dummy.cpp) target_link_libraries(exec_whitelist iface_whitelist) + +add_library(iface_imported INTERFACE IMPORTED) +set_property(TARGET iface_imported PROPERTY + INTERFACE_COMPILE_DEFINITIONS + $<$<CONFIG:SPECIAL>:SPECIAL_MODE> + $<$<CONFIG:Debug>:DEBUG_MODE> +) +set_property(TARGET iface_imported PROPERTY + MAP_IMPORTED_CONFIG_DEBUG SPECIAL +) + +add_executable(map_config map_config.cpp) +target_link_libraries(map_config iface_imported) diff --git a/Tests/InterfaceLibrary/map_config.cpp b/Tests/InterfaceLibrary/map_config.cpp new file mode 100644 index 0000000..81bb666 --- /dev/null +++ b/Tests/InterfaceLibrary/map_config.cpp @@ -0,0 +1,15 @@ + +#ifdef DEBUG_MODE +#ifndef SPECIAL_MODE +#error Special configuration should be mapped to debug configuration. +#endif +#else +#ifdef SPECIAL_MODE +#error Special configuration should not be enabled if not debug configuration +#endif +#endif + +int main(int,char**) +{ + return 0; +} |