Skip to content

Commit

Permalink
Merged Pull Request '#19 feature/32bit-options->main : 'BUILD: Set th…
Browse files Browse the repository at this point in the history
…e VS build platform in CMake if the 32bit flag is set.''

BUILD: Set the VS build platform in CMake if the 32bit flag is set.
  • Loading branch information
Automation51D authored May 19, 2023
2 parents 37fae72 + e4834f7 commit 012d3b2
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
10 changes: 7 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,14 @@ option(MemoryOnly "MemoryOnly" OFF)
option(NoThreading "NoThreading" OFF)
option(ExceptionsDisabled "ExceptionsDisabled" OFF)

if (32bit AND NOT MSVC AND NOT IS_ARM)
if (32bit AND NOT IS_ARM)
message("-- 32 bit compilation")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -m32")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -m32")
if (NOT MSVC)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -m32")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -m32")
else()
set(CMAKE_VS_PLATFORM_NAME "Win32")
endif()
endif()

if (NOT MSVC AND NOT APPLE)
Expand Down
7 changes: 7 additions & 0 deletions ci/setup-environment.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,10 @@ if ($BuildMethod -eq "msbuild") {
./environments/setup-msbuild.ps1

}

if ($IsLinux) {

# Install multilib, as this may be required.
sudo apt-get install -y gcc-multilib

}

0 comments on commit 012d3b2

Please sign in to comment.