diff --git a/CMakeLists.txt b/CMakeLists.txt index da0f4f95..ea1241f3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -143,7 +143,7 @@ target_include_directories(remill_settings INTERFACE $ ) -if(WIN32) +if(CMAKE_SYSTEM_NAME STREQUAL "Windows" AND MSVC) # warnings and compiler settings target_compile_options(remill_settings INTERFACE "$<$:/MDd>$<$:/MD>" @@ -167,6 +167,9 @@ if(WIN32) else() # warnings and compiler settings + if(CMAKE_SYSTEM_NAME STREQUAL "Linux") + target_compile_options(remill_settings INTERFACE -fPIC) + endif() target_compile_options(remill_settings INTERFACE -Wall -Wextra -Wno-unused-parameter -Wno-c++98-compat -Wno-unreachable-code-return -Wno-nested-anon-types diff --git a/bin/lift/CMakeLists.txt b/bin/lift/CMakeLists.txt index b9f4e564..85b7e0f6 100644 --- a/bin/lift/CMakeLists.txt +++ b/bin/lift/CMakeLists.txt @@ -13,7 +13,7 @@ # limitations under the License. project(remill-lift) -cmake_minimum_required(VERSION 3.2) +cmake_minimum_required(VERSION 3.21) # # target settings diff --git a/cmake/utils.cmake b/cmake/utils.cmake index 588766c9..f2665087 100644 --- a/cmake/utils.cmake +++ b/cmake/utils.cmake @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.2) +cmake_minimum_required(VERSION 3.21) function(GetTargetTree output_variable) if(${ARGC} LESS 1) diff --git a/lib/Arch/AArch32/Runtime/CMakeLists.txt b/lib/Arch/AArch32/Runtime/CMakeLists.txt index 884cf2f0..0f493116 100644 --- a/lib/Arch/AArch32/Runtime/CMakeLists.txt +++ b/lib/Arch/AArch32/Runtime/CMakeLists.txt @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -cmake_minimum_required(VERSION 3.6) +cmake_minimum_required(VERSION 3.21) project(arm_runtime) set(ARMRUNTIME_SOURCEFILES diff --git a/lib/Arch/AArch64/Runtime/CMakeLists.txt b/lib/Arch/AArch64/Runtime/CMakeLists.txt index 75460716..a4185da9 100644 --- a/lib/Arch/AArch64/Runtime/CMakeLists.txt +++ b/lib/Arch/AArch64/Runtime/CMakeLists.txt @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -cmake_minimum_required(VERSION 3.6) +cmake_minimum_required(VERSION 3.21) project(AARCH64_runtime) set(AARCH64RUNTIME_SOURCEFILES diff --git a/lib/Arch/PPC/Runtime/CMakeLists.txt b/lib/Arch/PPC/Runtime/CMakeLists.txt index b9bb1842..e2ad70db 100644 --- a/lib/Arch/PPC/Runtime/CMakeLists.txt +++ b/lib/Arch/PPC/Runtime/CMakeLists.txt @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -cmake_minimum_required(VERSION 3.6) +cmake_minimum_required(VERSION 3.21) project(ppc_runtime) set(PPCRUNTIME_SOURCEFILES diff --git a/lib/Arch/SPARC32/Runtime/CMakeLists.txt b/lib/Arch/SPARC32/Runtime/CMakeLists.txt index 13bc2bc1..bc32bd43 100644 --- a/lib/Arch/SPARC32/Runtime/CMakeLists.txt +++ b/lib/Arch/SPARC32/Runtime/CMakeLists.txt @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -cmake_minimum_required(VERSION 3.6) +cmake_minimum_required(VERSION 3.21) project(sparc32_runtime) set(SPARC32RUNTIME_SOURCEFILES diff --git a/lib/Arch/SPARC64/Runtime/CMakeLists.txt b/lib/Arch/SPARC64/Runtime/CMakeLists.txt index a7a2253d..b0937155 100644 --- a/lib/Arch/SPARC64/Runtime/CMakeLists.txt +++ b/lib/Arch/SPARC64/Runtime/CMakeLists.txt @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -cmake_minimum_required(VERSION 3.6) +cmake_minimum_required(VERSION 3.21) project(sparc64_runtime) set(SPARC64RUNTIME_SOURCEFILES diff --git a/lib/Arch/X86/Runtime/CMakeLists.txt b/lib/Arch/X86/Runtime/CMakeLists.txt index 170e2e90..ad91af8a 100644 --- a/lib/Arch/X86/Runtime/CMakeLists.txt +++ b/lib/Arch/X86/Runtime/CMakeLists.txt @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -cmake_minimum_required(VERSION 3.6) +cmake_minimum_required(VERSION 3.21) project(x86_runtime) set(X86RUNTIME_SOURCEFILES