Comments (4)
Thanks for the suggestion. The change was introduced to reduce the risks of DLL hijacking.
Would you be able to submit a pull request with a CMakeLists.txt change to specify the runtime using the built-in variables and properties?
from pcm.
Perhaps reducing the risk of DLL hijacking is the responsibility of the application developer?
Several compilers. I'm porting framework to Windows from Linux.
Ideally, I should not specify runtime, and everything should be built "out of the box", like in Linux.
But neither MSVS 19 nor MSVS 2022 was able to build due to linking errors.
And I must to set only static MT runtime to build.
This gives rise to several problems:
- It's difficult.
- Using this runtime generates errors when deleting objects (I don't want to debug this).
- I cannot use pre-built libraries, were built with a different runtime.
I just commented lines with target_compile_options(PCM_STATIC PRIVATE "/MT$<$<CONFIG:Debug>:d>")
.
Correct "CMake-style way" to change runtime is using MSVC_RUNTIME_LIBRARY
property, i.e.:
if (MSVC) # AND ($<COMPILE_LANGUAGE> STREQUAL CXX OR $<COMPILE_LANGUAGE> STREQUAL C))
set_property(TARGET "${target}" PROPERTY MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>DLL")
endif()
And variable to set runtime: set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>DLL")
.
But, please, don't specify runtime in the library.
from pcm.
thanks for the recipe. We will evaluate it. As a work-around we can offer a new -DNO_STATIC_MSVC_RUNTIME_LIBRARY=1 option which you can use with cmake when compiling pcm.
from pcm.
Thank you. It's better than nothing. But if you have a real reason to set the runtime library (like formal SDL requirements), perhaps in the future it would be better to add an option where the user can set an arbitrary runtime?
from pcm.
Related Issues (20)
- Add support for pcm-latency command when hyper threading is off HOT 9
- PCM error: no memory controllers found. HOT 2
- Error: unsupported processor. CPU model number: 170 Brand: "Intel(R) Core(TM) Ultra 7 155H" HOT 3
- PCM Assertion Failed HOT 4
- The Intel(r) Performance Counter Monitor Service service could not be started. HOT 1
- need some assistance interpreting values HOT 1
- pcm-sensor-server generated grafana dashboard uses unsupported grafana plugins HOT 6
- Impossible to build on Windows due to Linux header used in cpucounters.h HOT 5
- ERROR: pthread_setaffinity_np for core 1 failed with code 22 Marking core 1 offline HOT 20
- Measure per-NUMA memory bandwidth usage of a single core HOT 1
- unsupported Intel(R) Xeon(R) Platinum 8462Y+ HOT 2
- PCM show wrong upi ports number HOT 8
- PCM Does Not Display LMB and RMB Metrics in Prometheus Integration HOT 14
- pcm problem: Can not access server uncore PCI configuration space HOT 8
- Build failed on RHEL 9.2. HOT 4
- Grafana Shows Wrong Core_Frequency Value, But Data is Right HOT 4
- Double free HOT 12
- CMake options prefix
- Add dependency manager HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pcm.