[cmake-developers] [PATCH] Do not build CMake in C11 mode if _Thread_local support is broken.
Support for C11's _Thread_local was introduced in GCC in the 4.9 series, even though we make the C11 compiler flags available in CMake with GCC >= 4.6. FreeBSD's runetype.h uses _Thread_local, which causes CMake's own build to fail when using GCC < 4.9 and -std=gnu11: /usr/include/runetype.h:92:22: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'const' extern _Thread_local const _RuneLocale *_ThreadRuneLocale; Add a test for _Thread_local support and only build CMake itself with C11 support if it works. Bug: http://www.cmake.org/Bug/view.php?id=15741 --- CMakeLists.txt | 7 ++- Source/Checks/cm_c11_thread_local.c | 2 ++ Source/Checks/cm_c11_thread_local.cmake | 33 + 3 files changed, 41 insertions(+), 1 deletion(-) create mode 100644 Source/Checks/cm_c11_thread_local.c create mode 100644 Source/Checks/cm_c11_thread_local.cmake diff --git a/CMakeLists.txt b/CMakeLists.txt index 5e13a7e..94d138c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -38,7 +38,12 @@ endif() # Use most-recent available language dialects with GNU and Clang if(NOT DEFINED CMAKE_C_STANDARD AND NOT CMake_NO_C_STANDARD) - set(CMAKE_C_STANDARD 11) + include(${CMake_SOURCE_DIR}/Source/Checks/cm_c11_thread_local.cmake) + if(NOT CMake_C11_THREAD_LOCAL_BROKEN) +set(CMAKE_C_STANDARD 11) + else() +set(CMAKE_C_STANDARD 99) + endif() endif() if(NOT DEFINED CMAKE_CXX_STANDARD AND NOT CMake_NO_CXX_STANDARD) include(${CMake_SOURCE_DIR}/Source/Checks/cm_cxx14_cstdio.cmake) diff --git a/Source/Checks/cm_c11_thread_local.c b/Source/Checks/cm_c11_thread_local.c new file mode 100644 index 000..ab780f2 --- /dev/null +++ b/Source/Checks/cm_c11_thread_local.c @@ -0,0 +1,2 @@ +_Thread_local int i = 42; +int main(void) { return 0; } diff --git a/Source/Checks/cm_c11_thread_local.cmake b/Source/Checks/cm_c11_thread_local.cmake new file mode 100644 index 000..6b8d10b --- /dev/null +++ b/Source/Checks/cm_c11_thread_local.cmake @@ -0,0 +1,33 @@ +set(CMake_C11_THREAD_LOCAL_BROKEN 0) +if(CMAKE_CXX_COMPILER_ID MATCHES "GNU" AND CMAKE_C11_STANDARD_COMPILE_OPTION) + if(NOT DEFINED CMake_C11_THREAD_LOCAL_WORKS) +message(STATUS "Checking if compiler supports C11 _Thread_local") +try_compile(CMake_C11_THREAD_LOCAL_WORKS + ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_CURRENT_LIST_DIR}/cm_c11_thread_local.c + CMAKE_FLAGS -DCMAKE_C_STANDARD=11 + OUTPUT_VARIABLE OUTPUT + ) +if(CMake_C11_THREAD_LOCAL_WORKS AND "${OUTPUT}" MATCHES "error: expected '=', ',', ';', 'asm' or '__attribute__' before 'int'") + set_property(CACHE CMake_C11_THREAD_LOCAL_WORKS PROPERTY VALUE 0) +endif() +if(CMake_C11_THREAD_LOCAL_WORKS) + message(STATUS "Checking if compiler supports C11 _Thread_local - yes") + file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log +"Determining if compiler supports C11 _Thread_local passed with the following output:\n" +"${OUTPUT}\n" +"\n" +) +else() + message(STATUS "Checking if compiler supports C11 _Thread_local - no") + file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log +"Determining if compiler supports C11 _Thread_local failed with the following output:\n" +"${OUTPUT}\n" +"\n" +) +endif() + endif() + if(NOT CMake_C11_THREAD_LOCAL_WORKS) +set(CMake_C11_THREAD_LOCAL_BROKEN 1) + endif() +endif() -- 2.5.2 -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers
[cmake-developers] [PATCH] Features: Only enable C11 support on GCC >= 4.9.
As of version 3.3.1, CMake sets CMAKE_C11_STANDARD_COMPILE_OPTION and CMAKE_C11_EXTENSION_COMPILE_OPTION for GCC >= 4.7, and checks for C11 features for GCC >= 4.6. It also means CMake itself will be built with -std=gnu11 if GCC >= 4.7 is used. However, GCC only has full C11 support with the 4.9 release according to https://gcc.gnu.org/wiki/C11Status. Specifically, support for C11's _Thread_local is only present on GCC >= 4.9. This combination makes CMake fail to build with GCC 4.7 and 4.8 on FreeBSD, as runetype.h uses _Thread_local and the fact that -std=gnu11 is passed makes it not be a typedef or define for something else that would work. Adjust the GCC feature detection code to only consider C11 support to exist on GCC >= 4.9. Bug: http://www.cmake.org/Bug/view.php?id=15741 --- Modules/Compiler/GNU-C-FeatureTests.cmake | 7 +-- Modules/Compiler/GNU-C.cmake | 7 ++- 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/Modules/Compiler/GNU-C-FeatureTests.cmake b/Modules/Compiler/GNU-C-FeatureTests.cmake index b3fe33f..c7f5050 100644 --- a/Modules/Compiler/GNU-C-FeatureTests.cmake +++ b/Modules/Compiler/GNU-C-FeatureTests.cmake @@ -1,12 +1,7 @@ set(_cmake_oldestSupported "(__GNUC__ * 100 + __GNUC_MINOR__) >= 404") -# GNU 4.7 correctly sets __STDC_VERSION__ to 201112L, but GNU 4.6 sets it -# to 201000L. As the former is strictly greater than the latter, test only -# for the latter. If in the future CMake learns about a C feature which was -# introduced with GNU 4.7, that should test for the correct version, similar -# to the distinction between __cplusplus and __GXX_EXPERIMENTAL_CXX0X__ tests. -set(GNU46_C11 "(__GNUC__ * 100 + __GNUC_MINOR__) >= 406 && defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201000L") +set(GNU49_C11 "(__GNUC__ * 100 + __GNUC_MINOR__) >= 409 && defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L") set(_cmake_feature_test_c_static_assert "${GNU46_C11}") # Since 4.4 at least: set(GNU44_C99 "(__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L") diff --git a/Modules/Compiler/GNU-C.cmake b/Modules/Compiler/GNU-C.cmake index 031ab73..f1036db 100644 --- a/Modules/Compiler/GNU-C.cmake +++ b/Modules/Compiler/GNU-C.cmake @@ -14,12 +14,9 @@ if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 4.4) set(CMAKE_C99_EXTENSION_COMPILE_OPTION "-std=gnu99") endif() -if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 4.7) +if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 4.9) set(CMAKE_C11_STANDARD_COMPILE_OPTION "-std=c11") set(CMAKE_C11_EXTENSION_COMPILE_OPTION "-std=gnu11") -elseif (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 4.6) - set(CMAKE_C11_STANDARD_COMPILE_OPTION "-std=c1x") - set(CMAKE_C11_EXTENSION_COMPILE_OPTION "-std=gnu1x") endif() if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 5.0) @@ -34,7 +31,7 @@ macro(cmake_record_c_compile_features) endmacro() set(_result 0) - if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 4.6) + if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 4.9) _get_gcc_features(${CMAKE_C11_STANDARD_COMPILE_OPTION} CMAKE_C11_COMPILE_FEATURES) endif() if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 4.4) -- 2.5.2 -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers
Re: [cmake-developers] [PATCH] Features: Only enable C11 support on GCC >= 4.9.
Stephen Kelly <steve...@gmail.com> writes: > Raphael Kubo da Costa wrote: > >> Adjust the GCC feature detection code to only consider C11 support to >> exist on GCC >= 4.9. > > If you do that you must remove the definition of > CMAKE_CXX11_STANDARD_COMPILE_OPTION for GNU < 4.8.1 too. [...] > sys/cdefs.h requires that if you use -std=c11, your compiler must have the > c_thread_local feature. Therefore, you must not use -std=c11 with GNU < 4.9. [...] > Of course, the actual bug is in sys/cdefs.h as comment #2 in > https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=203066 > describes. I don't think comment #2 acknowledges there's a bug in cdefs.h; I see it as more of an acknowledgment that adding an additional check there would help work around/solve the issue. > The __STDC_VERSION__ macro on its own (just like the __cplusplus macro on > its own) is not suitable for feature testing. You must check the compiler > vendor and version (or use SD-6 for C++). [...] > So, in summary, there is no bug in CMake, but either your package needs to > change (to add CMake_NO_C_STANDARD=TRUE), or sys/cdefs.h needs to change, or > both. I see your point, and building with CMake_NO_C_STANDARD=TRUE or CMAKE_C_STANDARD=99 is definitely an option. I wouldn't count on cdefs.h being changed, and even if it was it wouldn't solve the issue on existing systems. Especially if you take into account the CMAKE_CXX11_STANDARD_COMPILE_OPTION argument, one could argue that this is about choosing how strict CMake should be when determining whether a compiler implements a standard: enabling C++11 support only with GCC 4.8 looks limiting and leaves out all the cases where it actually works fine with earlier versions. Is this patch too broad for C11 and GCC, or is it different from the C++11 case? It sounded like Brad was in favor of the former, whereas you'd like the change not to be merged. I am fine with just changing the way CMake is packaged on FreeBSD, but it still leaves it broken with third-party software (even outside FreeBSD in case they use an older GCC and _Thread_local) like you mentioned. -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers
Re: [cmake-developers] [PATCH] Features: Only enable C11 support on GCC >= 4.9.
Brad Kingwrites: > In this case CMake itself cannot build with C11 on this compiler/platform > combination so we should not try to do so. We already have some checks > here: > > http://www.cmake.org/gitweb?p=cmake.git;a=blob;f=CMakeLists.txt;hb=v3.3.1#l39 > > to decide whether to try using the latest standard or not. One could > add a check for the case in question if necessary. Do you mean checking for FreeBSD and compiler version? I thought it'd be too specific for upstream and was just going to make it be built with a different standard (or no standard) on FreeBSD itself. -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers
Re: [cmake-developers] [PATCH] Tests: Use a less strict regular expression to look for "SONAME".
Brad King <brad.k...@kitware.com> writes: > On 09/01/2015 09:30 AM, Raphael Kubo da Costa wrote: >> That's because that script is asserting that the regular expression does >> _not_ match, which is always the case when GNU binutils is not used. > > Prior to the refactoring it also tested for existence. See below. > How did that pass before? Interesting. I think it has always been "broken". >From a FreeBSD perspective (now that I'm getting its nightly test results back on track), what happened is that all FreeBSD releases so far use GNU binutils by default, and the switch to the elftoolchain utilities has been happening in HEAD (that's going to be FreeBSD 11). The readelf switch happened at the end of March, the machine stopped producing results in early April and thus this combination had never been tested until yesterday. -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers
Re: [cmake-developers] [PATCH] Tests: Use a less strict regular expression to look for "SONAME".
Brad Kingwrites: > The same regex appears in > > Tests/Plugin/check_mod_soname.cmake > > and has for years. I think that one should be updated too, but I > wonder why this problem has not been revealed in that test before. That's because that script is asserting that the regular expression does _not_ match, which is always the case when GNU binutils is not used. I'll send another version of the patch fixing this one as well. -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers
[cmake-developers] [PATCH v2] Tests: Use a less strict regular expression to look for "SONAME".
Commit 899458ab ("Tests: Cover NO_SONAME property for SHARED libraries") introduced a few new ExportImport tests, and the check_lib_{no}soname.cmake scripts that parse readelf(1)'s output. Make the regular expression matching the SONAME line output by readelf less strict, as the output format varies across implementations: GNU binutils' readelf is the only one to write each ELF header within parentheses (which the previous regular expression expected). The new tests were thus failing when either Fedora's elfutils (eu-readelf) or elftoolchain's readelf (present on recent FreeBSD versions) were being used, as they both list the headers without parentheses. The same issue also affected Tests/Plugin's check_mod_soname.cmake, so fix that one as well -- the only reason the test was not failing is that it tested that the regular expression did not match, which was always the case with a non-binutils readelf. --- Tests/ExportImport/Import/A/check_lib_nosoname.cmake | 2 +- Tests/ExportImport/Import/A/check_lib_soname.cmake | 2 +- Tests/Plugin/check_mod_soname.cmake | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Tests/ExportImport/Import/A/check_lib_nosoname.cmake b/Tests/ExportImport/Import/A/check_lib_nosoname.cmake index 6261ff4..613391e 100644 --- a/Tests/ExportImport/Import/A/check_lib_nosoname.cmake +++ b/Tests/ExportImport/Import/A/check_lib_nosoname.cmake @@ -1,5 +1,5 @@ execute_process(COMMAND ${readelf} -d ${lib} OUTPUT_FILE ${lib}.readelf.txt) -file(STRINGS ${lib}.readelf.txt soname REGEX "\\(SONAME\\)") +file(STRINGS ${lib}.readelf.txt soname REGEX "SONAME") if(soname) message(FATAL_ERROR "${lib} has soname but should not:\n ${soname}") else() diff --git a/Tests/ExportImport/Import/A/check_lib_soname.cmake b/Tests/ExportImport/Import/A/check_lib_soname.cmake index 7794e80..a3c4b54 100644 --- a/Tests/ExportImport/Import/A/check_lib_soname.cmake +++ b/Tests/ExportImport/Import/A/check_lib_soname.cmake @@ -1,5 +1,5 @@ execute_process(COMMAND ${readelf} -d ${lib} OUTPUT_FILE ${lib}.readelf.txt) -file(STRINGS ${lib}.readelf.txt soname REGEX "\\(SONAME\\)") +file(STRINGS ${lib}.readelf.txt soname REGEX "SONAME") if(soname) message(STATUS "${lib} has soname as expected:\n ${soname}") else() diff --git a/Tests/Plugin/check_mod_soname.cmake b/Tests/Plugin/check_mod_soname.cmake index 21a33b1..eeededa 100644 --- a/Tests/Plugin/check_mod_soname.cmake +++ b/Tests/Plugin/check_mod_soname.cmake @@ -1,5 +1,5 @@ execute_process(COMMAND ${readelf} -d ${mod} OUTPUT_FILE ${mod}.readelf.txt) -file(STRINGS ${mod}.readelf.txt soname REGEX "\\(SONAME\\)") +file(STRINGS ${mod}.readelf.txt soname REGEX "SONAME") if(soname) message(FATAL_ERROR "${mod} has soname but should not:\n ${soname}") else() -- 2.4.6 -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers
[cmake-developers] [PATCH] Tests: Use a less strict regular expression to look for "SONAME".
Commit 899458ab ("Tests: Cover NO_SONAME property for SHARED libraries") introduced a few new ExportImport tests, and the check_lib_{no}soname.cmake scripts that parse readelf(1)'s output. Make the regular expression matching the SONAME line output by readelf less strict, as the output format varies across implementations: GNU binutils' readelf is the only one to write each ELF header within parentheses (which the previous regular expression expected). The new tests were thus failing when either Fedora's elfutils (eu-readelf) or elftoolchain's readelf (present on recent FreeBSD versions) were being used, as they both list the headers without parentheses. --- Tests/ExportImport/Import/A/check_lib_nosoname.cmake | 2 +- Tests/ExportImport/Import/A/check_lib_soname.cmake | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Tests/ExportImport/Import/A/check_lib_nosoname.cmake b/Tests/ExportImport/Import/A/check_lib_nosoname.cmake index 6261ff4..613391e 100644 --- a/Tests/ExportImport/Import/A/check_lib_nosoname.cmake +++ b/Tests/ExportImport/Import/A/check_lib_nosoname.cmake @@ -1,5 +1,5 @@ execute_process(COMMAND ${readelf} -d ${lib} OUTPUT_FILE ${lib}.readelf.txt) -file(STRINGS ${lib}.readelf.txt soname REGEX "\\(SONAME\\)") +file(STRINGS ${lib}.readelf.txt soname REGEX "SONAME") if(soname) message(FATAL_ERROR "${lib} has soname but should not:\n ${soname}") else() diff --git a/Tests/ExportImport/Import/A/check_lib_soname.cmake b/Tests/ExportImport/Import/A/check_lib_soname.cmake index 7794e80..a3c4b54 100644 --- a/Tests/ExportImport/Import/A/check_lib_soname.cmake +++ b/Tests/ExportImport/Import/A/check_lib_soname.cmake @@ -1,5 +1,5 @@ execute_process(COMMAND ${readelf} -d ${lib} OUTPUT_FILE ${lib}.readelf.txt) -file(STRINGS ${lib}.readelf.txt soname REGEX "\\(SONAME\\)") +file(STRINGS ${lib}.readelf.txt soname REGEX "SONAME") if(soname) message(STATUS "${lib} has soname as expected:\n ${soname}") else() -- 2.4.6 -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers
[cmake-developers] [PATCH] Help: Fix typo in `if's documentation.
--- Help/command/if.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Help/command/if.rst b/Help/command/if.rst index 49c356e..a45b995 100644 --- a/Help/command/if.rst +++ b/Help/command/if.rst @@ -187,7 +187,7 @@ above-documented signature accepts ``variable|string``: variables, if so their defined values are used otherwise the original value is used. -* Both left and right hand argumemnts to ``VERSION_LESS``, +* Both left and right hand arguments to ``VERSION_LESS``, ``VERSION_EQUAL``, and ``VERSION_GREATER`` are independently tested to see if they are defined variables, if so their defined values are used otherwise the original value is used. -- 1.8.5.2 -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers
[cmake-developers] [PATCH] KWSys: Include backtrace-related headers on FreeBSD.
This was probably broken for a long while, but the problem was not apparent because the check for execinfo.h would fail by default because -I/usr/local/include was not being passed to the compiler when making the checks for the header's existence. Now that very recent FreeBSD versions (ie. 10-CURRENT) have NetBSD's libexecinfo in base (and it is thus installed into /usr), the backtrace-related checks would pass, but the required headers were not being included in SystemInformation.cxx. --- Source/kwsys/SystemInformation.cxx | 9 + 1 file changed, 9 insertions(+) diff --git a/Source/kwsys/SystemInformation.cxx b/Source/kwsys/SystemInformation.cxx index 7c31f3a..2672730 100644 --- a/Source/kwsys/SystemInformation.cxx +++ b/Source/kwsys/SystemInformation.cxx @@ -88,6 +88,15 @@ typedef int siginfo_t; # include ifaddrs.h # define KWSYS_SYSTEMINFORMATION_IMPLEMENT_FQDN # endif +# if defined(KWSYS_SYSTEMINFORMATION_HAS_BACKTRACE) +# include execinfo.h +# if defined(KWSYS_SYSTEMINFORMATION_HAS_CPP_DEMANGLE) +#include cxxabi.h +# endif +# if defined(KWSYS_SYSTEMINFORMATION_HAS_SYMBOL_LOOKUP) +#include dlfcn.h +# endif +# endif #endif #if defined(__OpenBSD__) || defined(__NetBSD__) -- 1.8.4 -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers
Re: [cmake-developers] Setting the INCLUDE_DIRECTORIES property before and after a target after 9106b564
Brad King brad.k...@kitware.com writes: CMake 2.8.8 introduced support for per-target include directories. Prior to that the directory-level INCLUDE_DIRECTORIES property was documented as read-only: $ cmake --help-property INCLUDE_DIRECTORIES cmake version 2.8.7 INCLUDE_DIRECTORIES List of preprocessor include file search directories. This read-only property specifies the list of directories given so far to the include_directories command. It is intended for debugging purposes. It was meant to be set only by the include_directories() command. The code in question was using previously undefined behavior and worked only by accident. Alright, thanks for the information, I'll fix the port in question and move forward. Cheers. -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers
[cmake-developers] Setting the INCLUDE_DIRECTORIES property before and after a target after 9106b564
While packaging CMake 2.8.8 for FreeBSD, an old port of lprof [1] started failing to build after some include headers were not found. The relevant CMakeLists does the following: add_library(foo foo.c) set_directory_properties( PROPERTIES INCLUDE_DIRECTORIES ${SOME_DIRECTORY}) foo.c includes bar.h which is in ${SOME_DIRECTORY}. This used to work until commit 9106b564ae5bf0bf1c1ff4a3fca484bcfd40e183, and the following patch can be applied to master for ctest to fail on the IncludeDirectories test: diff --git a/Tests/IncludeDirectories/TargetIncludeDirectories/CMakeLists.txt b/Tests/IncludeDirectories/TargetIncludeDirectories/CMakeLists.txt index 2cf36f5..05065c2 100644 --- a/Tests/IncludeDirectories/TargetIncludeDirectories/CMakeLists.txt +++ b/Tests/IncludeDirectories/TargetIncludeDirectories/CMakeLists.txt @@ -21,6 +21,7 @@ include_directories(${CMAKE_CURRENT_BINARY_DIR}/bar) add_executable(TargetIncludeDirectories main.cpp) set_property(TARGET TargetIncludeDirectories APPEND PROPERTY INCLUDE_DIRECTORIES ${CMAKE_CURRENT_BINARY_DIR}/bat) -set_property(TARGET TargetIncludeDirectories APPEND PROPERTY INCLUDE_DIRECTORIES ${CMAKE_CURRENT_BINARY_DIR}/foo) +# set_property(TARGET TargetIncludeDirectories APPEND PROPERTY INCLUDE_DIRECTORIES ${CMAKE_CURRENT_BINARY_DIR}/foo) +set_property(DIRECTORY PROPERTY INCLUDE_DIRECTORIES ${CMAKE_CURRENT_BINARY_DIR}/foo) include_directories(${CMAKE_CURRENT_BINARY_DIR}/baz) Moving that set_property(DIRECTORY) call somewhere before the add_executable() call makes the test pass. Is this change of behaviour intentional? Cheers. [1] http://www.freshports.org/graphics/lprof-devel -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers
Re: [cmake-developers] [PATCH] QtDialog: Set Ctrl+Q as the shortcut for quitting the program.
Clinton Stimpson clin...@elemtech.com writes: On Tuesday, December 13, 2011 04:51:16 pm Raphael Kubo da Costa wrote: QKeySequence::Quit does not work on all platforms, and since it translates to Ctrl+Q on all platforms where it does work, Ctrl+Q was hardcoded instead. --- Source/QtDialog/CMakeSetupDialog.cxx |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/Source/QtDialog/CMakeSetupDialog.cxx b/Source/QtDialog/CMakeSetupDialog.cxx index 1c058d3..338eaff 100644 --- a/Source/QtDialog/CMakeSetupDialog.cxx +++ b/Source/QtDialog/CMakeSetupDialog.cxx @@ -26,6 +26,7 @@ #include QMimeData #include QUrl #include QShortcut +#include QKeySequence #include QMacInstallDialog.h #include QCMake.h @@ -99,6 +100,7 @@ CMakeSetupDialog::CMakeSetupDialog() QObject::connect(this-DeleteCacheAction, SIGNAL(triggered(bool)), this, SLOT(doDeleteCache())); this-ExitAction = FileMenu-addAction(tr(Exit)); + this-ExitAction-setShortcut(QKeySequence(Qt::CTRL + Qt::Key_Q)); QObject::connect(this-ExitAction, SIGNAL(triggered(bool)), this, SLOT(close())); Can you instead make that + this-ExitAction-setShortcut(QKeySequence::Quit); Do you want to redo the patch, or shall we just make the change to use Quit? As I mentioned in the commit message, QKeySequence::Quit will not work on all platforms (the documentation says it translates to nothing on Windows, for example, and I couldn't use it on the i3 window manager, for example). I can change it if you prefer, though. -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers
[cmake-developers] [PATCH] Remove the apparently outdated README in Source/QtDialog.
Qt has been LGPL-licensed for a few years, so the clause mentioning only developers with a paid Qt license can change the code seems to be outdated. --- Source/QtDialog/README |3 --- 1 files changed, 0 insertions(+), 3 deletions(-) delete mode 100644 Source/QtDialog/README diff --git a/Source/QtDialog/README b/Source/QtDialog/README deleted file mode 100644 index 0701a2b..000 --- a/Source/QtDialog/README +++ /dev/null @@ -1,3 +0,0 @@ -This is the Qt interface to CMake. It has a BSD license compatible with the -Qt license exception. Only developers with a paid QT license are permitted -to make changes to this code. Small patches and bug fixes can -- 1.7.8 -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers
[cmake-developers] [PATCH] QtDialog: Set Ctrl+Q as the shortcut for quitting the program.
QKeySequence::Quit does not work on all platforms, and since it translates to Ctrl+Q on all platforms where it does work, Ctrl+Q was hardcoded instead. --- Source/QtDialog/CMakeSetupDialog.cxx |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/Source/QtDialog/CMakeSetupDialog.cxx b/Source/QtDialog/CMakeSetupDialog.cxx index 1c058d3..338eaff 100644 --- a/Source/QtDialog/CMakeSetupDialog.cxx +++ b/Source/QtDialog/CMakeSetupDialog.cxx @@ -26,6 +26,7 @@ #include QMimeData #include QUrl #include QShortcut +#include QKeySequence #include QMacInstallDialog.h #include QCMake.h @@ -99,6 +100,7 @@ CMakeSetupDialog::CMakeSetupDialog() QObject::connect(this-DeleteCacheAction, SIGNAL(triggered(bool)), this, SLOT(doDeleteCache())); this-ExitAction = FileMenu-addAction(tr(Exit)); + this-ExitAction-setShortcut(QKeySequence(Qt::CTRL + Qt::Key_Q)); QObject::connect(this-ExitAction, SIGNAL(triggered(bool)), this, SLOT(close())); -- 1.7.8 -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers
[cmake-developers] [PATCH] Fix typo in set_target_properties' documentation.
our - or --- Source/cmSetTargetPropertiesCommand.h |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/Source/cmSetTargetPropertiesCommand.h b/Source/cmSetTargetPropertiesCommand.h index feead00..320378d 100644 --- a/Source/cmSetTargetPropertiesCommand.h +++ b/Source/cmSetTargetPropertiesCommand.h @@ -92,7 +92,7 @@ public: If not set here then it is set to target_EXPORTS by default (with some substitutions if the target is not a valid C identifier). This is useful for headers to know whether they are -being included from inside their library our outside to properly +being included from inside their library or outside to properly setup dllexport/dllimport decorations. The COMPILE_FLAGS property sets additional compiler flags used to build sources within the target. It may also be used to pass -- 1.7.6.1 -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers
Re: [cmake-developers] Checking for -pthread before -lpthread{s} in FindThreads.cmake
Rolf Eike Beer e...@sf-mail.de writes: Am Sonntag 17 April 2011, 03:23:39 schrieb Raphael Kubo da Costa: Depending on the patch implementation, this would probably fix CMake bug #7830 as a side-effect. I think 7830 is another incarnation of what I submitted as bug 11333. And there is even a patch in my bug. I see. In your bug report, you said you were going to do some testing. Has it been done? Any opinions on the original issue too? ___ cmake-developers mailing list cmake-developers@cmake.org http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers
Re: [cmake-developers] Checking for -pthread before -lpthread{s} in FindThreads.cmake
Raphael Kubo da Costa kub...@gmail.com writes: FreeBSD explicitly recommends using -pthread [1], and I guess the same holds for at least gcc-based systems, where -pthread usually translates into automatically passing -lpthread and any necessary definitions to the compiler and the linker. Sorry, I forgot about [1] :) [1] http://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/dads-pthread.html ___ cmake-developers mailing list cmake-developers@cmake.org http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers