build: fix IGNORE_PCH option for modules and sort the PCH header list
This commit is contained in:
@@ -66,7 +66,7 @@ function(build_lib)
|
||||
"${BLIB_HEADER_FILES}"
|
||||
)
|
||||
|
||||
if(${PRECOMPILE_HEADERS_ENABLED} AND (NOT ${IGNORE_PCH}))
|
||||
if(${PRECOMPILE_HEADERS_ENABLED} AND (NOT ${BLIB_IGNORE_PCH}))
|
||||
target_precompile_headers(${lib${BLIB_LIBNAME}-obj} REUSE_FROM stdlib_pch)
|
||||
endif()
|
||||
|
||||
@@ -80,7 +80,7 @@ function(build_lib)
|
||||
# specific path for that
|
||||
add_library(${lib${BLIB_LIBNAME}} SHARED "${BLIB_SOURCE_FILES}")
|
||||
|
||||
if(${PRECOMPILE_HEADERS_ENABLED} AND (NOT ${IGNORE_PCH}))
|
||||
if(${PRECOMPILE_HEADERS_ENABLED} AND (NOT ${BLIB_IGNORE_PCH}))
|
||||
target_precompile_headers(${lib${BLIB_LIBNAME}} REUSE_FROM stdlib_pch)
|
||||
endif()
|
||||
endif()
|
||||
@@ -245,7 +245,7 @@ function(build_lib)
|
||||
target_compile_definitions(
|
||||
${test${BLIB_LIBNAME}} PRIVATE NS_TEST_SOURCEDIR="${FOLDER}/test"
|
||||
)
|
||||
if(${PRECOMPILE_HEADERS_ENABLED} AND (NOT ${IGNORE_PCH}))
|
||||
if(${PRECOMPILE_HEADERS_ENABLED} AND (NOT ${BLIB_IGNORE_PCH}))
|
||||
target_precompile_headers(${test${BLIB_LIBNAME}} REUSE_FROM stdlib_pch)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
@@ -1237,23 +1237,23 @@ macro(process_options)
|
||||
|
||||
if(${PRECOMPILE_HEADERS_ENABLED})
|
||||
set(precompiled_header_libraries
|
||||
<iostream>
|
||||
<stdint.h>
|
||||
<stdlib.h>
|
||||
<map>
|
||||
<unordered_map>
|
||||
<vector>
|
||||
<list>
|
||||
<algorithm>
|
||||
<string>
|
||||
<cstdlib>
|
||||
<cstring>
|
||||
<exception>
|
||||
<fstream>
|
||||
<iostream>
|
||||
<limits>
|
||||
<list>
|
||||
<map>
|
||||
<math.h>
|
||||
<set>
|
||||
<sstream>
|
||||
<fstream>
|
||||
<cstdlib>
|
||||
<exception>
|
||||
<cstring>
|
||||
<limits>
|
||||
<math.h>
|
||||
<stdint.h>
|
||||
<stdlib.h>
|
||||
<string>
|
||||
<unordered_map>
|
||||
<vector>
|
||||
)
|
||||
add_library(stdlib_pch OBJECT ${PROJECT_SOURCE_DIR}/build-support/empty.cc)
|
||||
target_precompile_headers(
|
||||
|
||||
Reference in New Issue
Block a user