mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-12-23 17:38:44 +00:00
Changed: #880 Use PCH under Linux with CMake
This commit is contained in:
parent
05b81e9f30
commit
8144bb8696
2 changed files with 4 additions and 16 deletions
|
@ -32,24 +32,12 @@ SET_TARGET_PROPERTIES(nelmisc PROPERTIES
|
|||
ADD_DEFINITIONS(${LIBXML2_DEFINITIONS})
|
||||
|
||||
IF(WIN32)
|
||||
FOREACH(FILENAME ${SRC})
|
||||
IF("${FILENAME}" MATCHES "stdmisc.cpp")
|
||||
SET_SOURCE_FILES_PROPERTIES(stdmisc.cpp PROPERTIES COMPILE_FLAGS "/Ycstdmisc.h")
|
||||
ELSEIF("${FILENAME}" MATCHES "config_file")
|
||||
# I don't really want to do anything here but you can uncomment this if you need to test.
|
||||
# MESSAGE("Note: Not adding pre-compiled headers to: ${FILENAME}.")
|
||||
#
|
||||
ELSE("${FILENAME}" MATCHES "stdmisc.cpp")
|
||||
SET_SOURCE_FILES_PROPERTIES(${FILENAME} PROPERTIES COMPILE_FLAGS "/Yustdmisc.h")
|
||||
ENDIF("${FILENAME}" MATCHES "stdmisc.cpp")
|
||||
ENDFOREACH (FILENAME)
|
||||
|
||||
SET_TARGET_PROPERTIES(nelmisc PROPERTIES
|
||||
DEBUG_POSTFIX "_d"
|
||||
RELEASE_POSTFIX "_r")
|
||||
INCLUDE_DIRECTORIES(${DXSDK_INCLUDE_DIR})
|
||||
ELSE(WIN32)
|
||||
ADD_NATIVE_PRECOMPILED_HEADER(nelmisc ${CMAKE_CURRENT_SOURCE_DIR}/stdmisc.h ${CMAKE_CURRENT_SOURCE_DIR}/stdmisc.cpp)
|
||||
ENDIF(WIN32)
|
||||
|
||||
ADD_NATIVE_PRECOMPILED_HEADER(nelmisc ${CMAKE_CURRENT_SOURCE_DIR}/stdmisc.h ${CMAKE_CURRENT_SOURCE_DIR}/stdmisc.cpp)
|
||||
|
||||
INSTALL(TARGETS nelmisc LIBRARY DESTINATION lib ARCHIVE DESTINATION lib COMPONENT libraries)
|
||||
|
|
|
@ -64,7 +64,7 @@ std::string CCmdArgs::getArg(char argName) const
|
|||
begin++;
|
||||
|
||||
// End
|
||||
uint size = _Args[i].size();
|
||||
uint size = (uint)_Args[i].size();
|
||||
if(size && _Args[i][size-1] == '"')
|
||||
size--;
|
||||
size = (uint)(std::max((int)0, (int)size-(int)begin));
|
||||
|
|
Loading…
Reference in a new issue