Skip to content

Commit

Permalink
disable ninja 32-bit build
Browse files Browse the repository at this point in the history
  • Loading branch information
eparshut committed Jun 26, 2024
1 parent d6da71d commit e2e5e20
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 deletions.
9 changes: 1 addition & 8 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,7 @@ option(FORCE_32 "Force a 32-bit compile on 64-bit" OFF)
option(ITT_API_IPT_SUPPORT "ptmarks support" OFF)
option(ITT_API_FORTRAN_SUPPORT "fortran support" OFF)

if(WIN32 AND CMAKE_GENERATOR STREQUAL "Ninja Multi-Config" AND CMAKE_CXX_COMPILER_ID MATCHES "Intel")
set(WIN_NINJA_INTEL ON)
endif()

if(FORCE_32 AND (UNIX OR WIN_NINJA_INTEL))
if(FORCE_32 AND UNIX)
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -m32")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -m32")
endif()
Expand Down Expand Up @@ -88,9 +84,6 @@ if(ITT_API_IPT_SUPPORT)
if(ARCH_64)
set(ITT_PT src/ittnotify/ittptmark64.asm)
else()
if(WIN_NINJA_INTEL)
SET(CMAKE_ASM_MASM_FLAGS "${CMAKE_ASM_MASM_FLAGS} -m32")
endif()
set(ITT_PT src/ittnotify/ittptmark32.asm)
endif()
endif()
Expand Down
6 changes: 4 additions & 2 deletions buildall.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,9 @@ def main():
return

if sys.platform == 'win32':
if vs_versions and args.cmake_gen != 'ninja':
# ninja does not support platform bit specification
use_ninja = args.cmake_gen == 'ninja' and bits =='64'
if vs_versions and not use_ninja:
generator = 'Visual Studio {}'.format(args.vs)
generator_args = '-A {}'.format('x64' if bits ==
'64' else 'Win32')
Expand All @@ -179,7 +181,7 @@ def main():
])))

if sys.platform == 'win32':
target_project = 'ALL_BUILD' if args.cmake_gen != 'ninja' else 'all'
target_project = 'ALL_BUILD' if not use_ninja else 'all'
run_shell('%s --build . --config %s --target %s' %
(cmake, ('Debug' if args.debug else 'Release'), target_project))
else:
Expand Down

0 comments on commit e2e5e20

Please sign in to comment.