Add the "-pthread" flag to the G++/Clang common flags instead of using another redundant condition
This commit is contained in:
		
							parent
							
								
									6243e97d48
								
							
						
					
					
						commit
						ed3da58e31
					
				| @ -29,16 +29,12 @@ else() | ||||
|     set(CMAKE_POSITION_INDEPENDENT_CODE TRUE) | ||||
| endif() | ||||
| set(CMAKE_CXX_FLAGS "-Wall") | ||||
| set(CMAKE_CXX_FLAGS_RELEASE "-Os") | ||||
| set(MINIMAL_GNU "11.0") | ||||
| set(MINIMAL_CLANG "13.0") | ||||
| set(IS_GNU (${CMAKE_CXX_COMPILER_ID} STREQUAL GNU)) | ||||
| set(IS_CLANG (${CMAKE_CXX_COMPILER_ID} STREQUAL Clang)) | ||||
| 
 | ||||
| if (NOT MSVC) | ||||
|     set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread") | ||||
| endif() | ||||
| set(CMAKE_CXX_FLAGS_RELEASE "-Os") | ||||
| 
 | ||||
| if (NOT DEFINED CCACHE_PRESENT) | ||||
|     find_program(CCACHE_PRESENT ccache) | ||||
| endif() | ||||
| @ -55,7 +51,7 @@ if (${IS_GNU} OR ${IS_CLANG}) | ||||
|             add_definitions(-D_GLIBCXX_PARALLEL) | ||||
|         endif() | ||||
|     endif() | ||||
|     set(CMAKE_CXX_FLAGS "-flto ${CMAKE_CXX_FLAGS} -fstrict-enums -pipe -fstack-protector-strong -fstack-clash-protection -funwind-tables -fasynchronous-unwind-tables -frtti -fexceptions") | ||||
|     set(CMAKE_CXX_FLAGS "-pthread -flto ${CMAKE_CXX_FLAGS} -fstrict-enums -pipe -fstack-protector-strong -fstack-clash-protection -funwind-tables -fasynchronous-unwind-tables -frtti -fexceptions") | ||||
|     set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -ffunction-sections -fdata-sections -fmerge-all-constants -ftree-vectorize") | ||||
|     include(CheckCXXCompilerFlag) | ||||
|     set(CF_PROTECTION "-fcf-protection") | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user