CMake는 정보를 두 번 인쇄 할뿐만 아니라
정상입니다 : 구성 중에 여러 단계가 수행됩니다. 모든 단계에서 도구 체인 파일이 사용되었습니다.
또한 그 후 세 번째로 포함 된 파일을 찾을 수 없다고 주장합니다. 어떤 아이디어?
절대적인 경로를 제공하십시오.
문제
언급하기와 관련이없는 이유로 여러 파일을 도구 체인 파일에 포함시킬 수 있기를 원합니다. 내 툴체인에 다음과 같은 것이 포함되어 있다고 가정 해 봅시다.
message(STATUS "file1 is ok") include(./build/file2)
File2에는 식별 라인이 포함되어 있습니다.
message(STATUS "file2 is ok")
cmakelists.txt에는 다음이 포함됩니다.
cmake_minimum_required (VERSION 2.8.8) project (pro) message(STATUS "cmakelists.txt is ok")
다음 명령을 사용하여 호출합니다.
cmake -DCMAKE_TOOLCHAIN_FILE=../../build/file1 ../../
이제 다음과 같은 출력을 기대할 것입니다.
-- file1 is ok -- file2 is ok -- cmakelists.txt is ok
그러나 나는 이것을 얻는다 :
-- file1 is ok -- file2 is ok -- file1 is ok -- file2 is ok -- The C compiler identification is Clang 5.0.0 -- The CXX compiler identification is Clang 5.0.0 -- Check for working C compiler: /usr/bin/cc CMake Error at /fullpath/build/file1:2 (include): include could not find load file: ./build/file2 Call Stack (most recent call first): /fullpath/build/Mac/CMakeFiles/2.8.12/CMakeSystem.cmake:6 (include) CMakeLists.txt:2 (PROJECT) CMake Error: Internal CMake error, TryCompile configure of cmake failed -- Check for working C compiler: /usr/bin/cc -- broken CMake Error at /Applications/CMake 2.8-12.app/Contents/share/cmake-2.8/Modules/CMakeTestCCompiler.cmake:61 (message): The C compiler "/usr/bin/cc" is not able to compile a simple test program. It fails with the following output: CMake will not be able to correctly generate this project. Call Stack (most recent call first): CMakeLists.txt:2 (project) -- Configuring incomplete, errors occurred!
CMake는 정보를 두 번 인쇄 할뿐만 아니라 그 후 세 번째로 포함 된 파일을 찾을 수 없다고 주장합니다.
어떤 아이디어?
해결책
CMake는 정보를 두 번 인쇄 할뿐만 아니라
정상입니다 : 구성 중에 여러 단계가 수행됩니다. 모든 단계에서 도구 체인 파일이 사용되었습니다.
또한 그 후 세 번째로 포함 된 파일을 찾을 수 없다고 주장합니다. 어떤 아이디어?
절대적인 경로를 제공하십시오.