File-specific build directives

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

File-specific build directives

eblotml
Hi,

What is the best way, in a CMakeLists.txt file, to define specific build directive(s) for one or more C/C++ files, while other files are built with the default directives?

As an example, how to apply "-O2" for one or more files, while building the remaining file with "-Os"?

TIA,
Manu
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: File-specific build directives

Michael Wild

On 15. Jul, 2009, at 13:56, [hidden email] wrote:

> Hi,
>
> What is the best way, in a CMakeLists.txt file, to define specific  
> build directive(s) for one or more C/C++ files, while other files  
> are built with the default directives?
>
> As an example, how to apply "-O2" for one or more files, while  
> building the remaining file with "-Os"?
>
> TIA,
> Manu


Hi

cmake --help-command set_source_files_properties


Michael
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: File-specific build directives

eblotml

> cmake --help-command set_source_files_properties

Thanks a lot Michael.

Cheers,
Manu
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake
Loading...