View Issue Details [ Jump to Notes ] | [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
0011963 | CMake | CMake | public | 2011-03-12 12:29 | 2011-06-17 18:38 | ||||
Reporter | Caesar | ||||||||
Assigned To | Brad King | ||||||||
Priority | normal | Severity | crash | Reproducibility | have not tried | ||||
Status | closed | Resolution | fixed | ||||||
Platform | Linux | OS | Debian | OS Version | Squeeze | ||||
Product Version | CMake-2-8 | ||||||||
Target Version | CMake 2.8.5 | Fixed in Version | CMake 2.8.5 | ||||||
Summary | 0011963: Assertion `in_remote[0] != '\"'' failed. | ||||||||
Description | I got this cmake: ../../Source/cmLocalGenerator.cxx:2359: std::string cmLocalGenerator::ConvertToRelativePath(const std::vector<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::basic_string<char, std::char_traits<char>, std::allocator<char> > > >&, const char*, bool): Assertion `in_remote[0] != '\"'' failed. after -- Configuring done | ||||||||
Steps To Reproduce | To reproduce, you can pull http://hg.openclonk.org/openclonk/rev/c6007540604b [^] and apply diff -r 5345b54de388 CMakeLists.txt --- a/CMakeLists.txt Sat Mar 12 13:47:46 2011 +0100 +++ b/CMakeLists.txt Sat Mar 12 18:24:54 2011 +0100 @@ -1031,6 +1031,21 @@ endforeach() ############################################################################ +# Precompiled header support, gcc part (it needs the cxx flags) +############################################################################ + +include(GccPchSupport.cmake) +if(CMAKE_COMPILER_IS_GNUCXX) + if(NOT DEFINED USE_GCC_PCH) + message("Using GCC precompiled headers! USE_GCC_PCH=Off to disable.") + endif() + option(USE_GCC_PCH "Use GCC precompiled headers" ON) +endif() +if(USE_GCC_PCH) + add_precompiled_header(clonk src/C4Include.h) +endif() + +############################################################################ # Locate optional libraries (if so desired) ############################################################################ CHECK_INCLUDE_FILE_CXX(getopt.h HAVE_GETOPT_H) diff -r 5345b54de388 GccPchSupport.cmake --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/GccPchSupport.cmake Sat Mar 12 18:24:54 2011 +0100 @@ -0,0 +1,71 @@ +#Copied from http://www.mail-archive.com/cmake@cmake.org/msg04394.html [^] which copied it from the rosengarden project +#see also: http://gcc.gnu.org/onlinedocs/gcc-4.0.4/gcc/Precompiled-Headers.html [^] + +MACRO(ADD_PRECOMPILED_HEADER _targetName _input ) + + if(CMAKE_BUILD_TYPE) + SET(_proper_build_type ${CMAKE_BUILD_TYPE}) + else() + SET(_proper_build_type Release) + endif() + + SET(_source "${CMAKE_CURRENT_SOURCE_DIR}/${_input}") + SET(_outdir "CMakeFiles/pch.custom.dir/${_input}.gch") + MAKE_DIRECTORY(${_outdir}) + SET(_output "${_outdir}/${_targetName}_${_proper_build_type}.o") + #GET_FILENAME_COMPONENT(_name ${_input} NAME) + #SET(_source "${CMAKE_CURRENT_SOURCE_DIR}/${_input}") + #SET(_outdir "${CMAKE_CURRENT_BINARY_DIR}/${_name}.gch") + #MAKE_DIRECTORY(${_outdir}) + #SET(_output "${_outdir}/${CMAKE_BUILD_TYPE}.c++") + + STRING(TOUPPER "CMAKE_CXX_FLAGS_${_proper_build_type}" _flags_var_name) + if(CMAKE_CXX_COMPILER_ARG1) + STRING(STRIP CMAKE_CXX_COMPILER_ARG1 _ccache_tweak) + SET(_ccache_tweak "${_ccache_tweak}") + endif() + SET(_compiler_FLAGS ${CMAKE_CXX_FLAGS} ${${_flags_var_name}}) + GET_DIRECTORY_PROPERTY(_compile_defines COMPILE_DEFINITIONS) + FOREACH(item ${_compile_definitions}) + LIST(APPEND _compiler_FLAGS "-D\"${item}\"") + ENDFOREACH(item) + GET_DIRECTORY_PROPERTY(_compile_defines COMPILE_DEFINITIONS_${_proper_build_type}) + FOREACH(item ${_compile_definitions}) + LIST(APPEND _compiler_FLAGS "-D\"${item}\"") + ENDFOREACH(item) + GET_DIRECTORY_PROPERTY(_directory_flags INCLUDE_DIRECTORIES) + FOREACH(item ${_directory_flags}) + LIST(APPEND _compiler_FLAGS "-I\"${item}\"") + ENDFOREACH(item) + GET_DIRECTORY_PROPERTY(_directory_flags DEFINITIONS) + LIST(APPEND _compiler_FLAGS ${_directory_flags}) + SEPARATE_ARGUMENTS(_compiler_FLAGS) + #STRING(TOUPPER "CMAKE_CXX_FLAGS_${CMAKE_BUILD_TYPE}" _flags_var_name) + #SET(_compiler_FLAGS ${${_flags_var_name}}) + # + #GET_DIRECTORY_PROPERTY(_directory_flags INCLUDE_DIRECTORIES) + #FOREACH(item ${_directory_flags}) + # LIST(APPEND _compiler_FLAGS "-I${item}") + #ENDFOREACH(item) + # + #GET_DIRECTORY_PROPERTY(_directory_flags DEFINITIONS) + #LIST(APPEND _compiler_FLAGS ${_directory_flags}) + + #SEPARATE_ARGUMENTS(_compiler_FLAGS) + #MESSAGE("_compiler_FLAGS: ${_compiler_FLAGS}") + #message("${CMAKE_CXX_COMPILER} ${_compiler_FLAGS} -x c++-header -o ${_output} ${_source}") + ADD_CUSTOM_COMMAND( + OUTPUT ${_output} + COMMAND "\"${CMAKE_CXX_COMPILER}\"" + ${_compiler_FLAGS} -x c++-header -o ${_output} ${_source} + DEPENDS ${_source} + ) + ADD_CUSTOM_TARGET(${_targetName}_pch DEPENDS ${_output} VERBATIM) + ADD_DEPENDENCIES(${_targetName} ${_targetName}_pch) + #SET(CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} "-include ${_name} -Winvalid-pch-H") + #SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -include ${_name} -Winvalid-pch") + #SET_TARGET_PROPERTIES(${_targetName} PROPERTIES + #COMPILE_FLAGS "-include ${_name} -Winvalid-pch" + #) + +ENDMACRO(ADD_PRECOMPILED_HEADER) | ||||||||
Additional Information | The assertion will only be triggered if ADD_CUSTOM_COMMAND is called. The crucial line although is COMMAND "\"${CMAKE_CXX_COMPILER}\"", using COMMAND "${CMAKE_CXX_COMPILER}" works fine. I know that the former makes nearly no sense, but it shouldn't trigger an assertion. Besides, I use CMake 2.8.2. | ||||||||
Tags | No tags attached. | ||||||||
Attached Files | |||||||||
Relationships | |
Relationships |
Notes | |
(0025774) Brad King (manager) 2011-03-14 09:30 |
Even this is enough to cause it: add_custom_target(drive COMMAND "\"ls\"") |
(0025777) Brad King (manager) 2011-03-14 17:54 |
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=339d5922 [^] |
Notes |
Issue History | |||
Date Modified | Username | Field | Change |
2011-03-12 12:29 | Caesar | New Issue | |
2011-03-14 09:27 | Brad King | Assigned To | => Brad King |
2011-03-14 09:27 | Brad King | Status | new => assigned |
2011-03-14 09:30 | Brad King | Note Added: 0025774 | |
2011-03-14 17:54 | Brad King | Note Added: 0025777 | |
2011-03-14 17:54 | Brad King | Status | assigned => closed |
2011-03-14 17:54 | Brad King | Resolution | open => fixed |
2011-06-17 18:38 | David Cole | Fixed in Version | => CMake 2.8.5 |
2011-06-17 18:38 | David Cole | Target Version | => CMake 2.8.5 |
Issue History |
Copyright © 2000 - 2018 MantisBT Team |