mirror of
https://github.com/reactos/CMake.git
synced 2024-11-29 14:30:27 +00:00
Merge topic 'vs-librarian-machine-flag-default'
806609c7
VS: Add /machine: flag to Librarian tool (#11240)
This commit is contained in:
commit
1cb8d95509
@ -230,6 +230,7 @@ elseif(MSVC_Fortran_ARCHITECTURE_ID)
|
||||
set(_MACHINE_ARCH_FLAG "/machine:${MSVC_Fortran_ARCHITECTURE_ID}")
|
||||
endif()
|
||||
set(CMAKE_EXE_LINKER_FLAGS_INIT "${CMAKE_EXE_LINKER_FLAGS_INIT} ${_MACHINE_ARCH_FLAG}")
|
||||
set(CMAKE_STATIC_LINKER_FLAGS_INIT "${CMAKE_STATIC_LINKER_FLAGS_INIT} ${_MACHINE_ARCH_FLAG}")
|
||||
unset(_MACHINE_ARCH_FLAG)
|
||||
|
||||
# add /debug and /INCREMENTAL:YES to DEBUG and RELWITHDEBINFO also add pdbtype
|
||||
|
@ -46,7 +46,10 @@ else()
|
||||
include_directories(${CMAKE_CURRENT_BINARY_DIR})
|
||||
endif()
|
||||
|
||||
add_library(ResourceLib STATIC lib.cpp lib.rc)
|
||||
|
||||
add_executable(VSResource main.cpp test.rc)
|
||||
target_link_libraries(VSResource ResourceLib)
|
||||
|
||||
set_property(TARGET VSResource
|
||||
PROPERTY VS_GLOBAL_CMakeTestVsGlobalVariable "test val")
|
||||
|
1
Tests/VSResource/lib.cpp
Normal file
1
Tests/VSResource/lib.cpp
Normal file
@ -0,0 +1 @@
|
||||
int lib() { return 0; }
|
4
Tests/VSResource/lib.rc
Normal file
4
Tests/VSResource/lib.rc
Normal file
@ -0,0 +1,4 @@
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
1234 "5"
|
||||
END
|
@ -1,6 +1,8 @@
|
||||
#include <windows.h>
|
||||
#include <stdio.h>
|
||||
|
||||
extern int lib();
|
||||
|
||||
struct x
|
||||
{
|
||||
const char *txt;
|
||||
@ -76,5 +78,5 @@ int main(int argc, char** argv)
|
||||
}
|
||||
}
|
||||
|
||||
return ret;
|
||||
return ret + lib();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user