cmake

Replace ctest command with “ctest --output-on-failure” permanently for a specific project in CMakeLists.txt

自闭症网瘾萝莉.ら 提交于 2020-07-26 16:57:17
问题 I have found that generic ctest command doesn't give much information about the tests, so I would like to add ctest --output-on-failure but not have the users to worry about the flag. I want them just to cmake , make the project and run ctest and it should run ctest with the --output-on-failure flag. Is it possible to do that in CMakeLists.txt? EDIT: Output of env CTEST_OUTPUT_ON_FAILURE=1 make test 4/13 Test #4: TEST_SSSP ........................***Failed Required regular expression not

Replace ctest command with “ctest --output-on-failure” permanently for a specific project in CMakeLists.txt

末鹿安然 提交于 2020-07-26 16:56:38
问题 I have found that generic ctest command doesn't give much information about the tests, so I would like to add ctest --output-on-failure but not have the users to worry about the flag. I want them just to cmake , make the project and run ctest and it should run ctest with the --output-on-failure flag. Is it possible to do that in CMakeLists.txt? EDIT: Output of env CTEST_OUTPUT_ON_FAILURE=1 make test 4/13 Test #4: TEST_SSSP ........................***Failed Required regular expression not

Replace ctest command with “ctest --output-on-failure” permanently for a specific project in CMakeLists.txt

时间秒杀一切 提交于 2020-07-26 16:56:31
问题 I have found that generic ctest command doesn't give much information about the tests, so I would like to add ctest --output-on-failure but not have the users to worry about the flag. I want them just to cmake , make the project and run ctest and it should run ctest with the --output-on-failure flag. Is it possible to do that in CMakeLists.txt? EDIT: Output of env CTEST_OUTPUT_ON_FAILURE=1 make test 4/13 Test #4: TEST_SSSP ........................***Failed Required regular expression not

Replace ctest command with “ctest --output-on-failure” permanently for a specific project in CMakeLists.txt

眉间皱痕 提交于 2020-07-26 16:54:24
问题 I have found that generic ctest command doesn't give much information about the tests, so I would like to add ctest --output-on-failure but not have the users to worry about the flag. I want them just to cmake , make the project and run ctest and it should run ctest with the --output-on-failure flag. Is it possible to do that in CMakeLists.txt? EDIT: Output of env CTEST_OUTPUT_ON_FAILURE=1 make test 4/13 Test #4: TEST_SSSP ........................***Failed Required regular expression not

clickhouse交叉编译(编译机器x86,目标平台ARM64),clang: error: invalid linker name in argument '-fuse-ld=lld'

大城市里の小女人 提交于 2020-07-26 15:26:47
-- The C compiler identification is Clang 8.0.1 -- The CXX compiler identification is Clang 8.0.1 -- Check for working C compiler: /usr/bin/clang-8 -- Check for working C compiler: /usr/bin/clang-8 -- broken CMake Error at /usr/share/cmake-3.10/Modules/CMakeTestCCompiler.cmake:52 (message): The C compiler "/usr/bin/clang-8" is not able to compile a simple test program. It fails with the following output: Change Dir: /root/ClickHouse/build-arm64/CMakeFiles/CMakeTmp Run Build Command:"/usr/bin/ninja" "cmTC_3f054" [1/2] Building C object CMakeFiles/cmTC_3f054.dir/testCCompiler.c.o [2/2] Linking C

Mac OS 10.16 Linking Homebrew installed libraries

自闭症网瘾萝莉.ら 提交于 2020-07-23 06:45:44
问题 I have been using homebrew for long time and never faced this strange issue. For some reason I will not explain here am using MacOS 10.16 (Big Sur), a Beta version of latest MacOS and have installed libraries using homebrew. One of those library is zlib . But building with CMake, It cannot find the library. I have tried to build wxWidgets as well as libcurl. Both have failed with similar error: -- make[2]: *** No rule to make target `/usr/lib/libz.dylib', needed by `lib/libwx_baseu-3.1.dylib'

how to append sources to custom target?

断了今生、忘了曾经 提交于 2020-07-23 06:45:26
问题 With target_sources we can easily add sources to target created previously, but as the manual said: The named target must have been created by a command such as add_executable() or add_library() and must not be an IMPORTED Target. So how to add more sources to a target already created by add_custom_target ? Considering I have a project structured bellow: hello `- CMakeLists.txt # level 1 `- hello.x `- world/ `-- CMakeLists.txt # level 2 `-- world.x Is there any better way to extend the custom

how to append sources to custom target?

放肆的年华 提交于 2020-07-23 06:43:33
问题 With target_sources we can easily add sources to target created previously, but as the manual said: The named target must have been created by a command such as add_executable() or add_library() and must not be an IMPORTED Target. So how to add more sources to a target already created by add_custom_target ? Considering I have a project structured bellow: hello `- CMakeLists.txt # level 1 `- hello.x `- world/ `-- CMakeLists.txt # level 2 `-- world.x Is there any better way to extend the custom

How to get a relative path for CMake unit tests?

末鹿安然 提交于 2020-07-23 06:05:30
问题 I have a project built with CMake that uses Catch2 for unit tests. Some of the unit tests exercise code that loads data from a file like this: std::string resource_dir = "TEST_CWD/resources/"; std::ifstream infile{resource_dir + "datafile.txt"} The question is how to properly get the value of TEST_CWD . The directory structure is simple (and not set in stone): my_project/ test/ resources/datafile.txt loader_test.cpp Leaving TEST_CWD blank sometimes works, but breaks when running tests through

How to get a relative path for CMake unit tests?

自古美人都是妖i 提交于 2020-07-23 06:04:06
问题 I have a project built with CMake that uses Catch2 for unit tests. Some of the unit tests exercise code that loads data from a file like this: std::string resource_dir = "TEST_CWD/resources/"; std::ifstream infile{resource_dir + "datafile.txt"} The question is how to properly get the value of TEST_CWD . The directory structure is simple (and not set in stone): my_project/ test/ resources/datafile.txt loader_test.cpp Leaving TEST_CWD blank sometimes works, but breaks when running tests through