Adsk Contrib - Setup Debugger Env Paths#2262
Open
cozdas wants to merge 5 commits intoAcademySoftwareFoundation:mainfrom
Open
Adsk Contrib - Setup Debugger Env Paths#2262cozdas wants to merge 5 commits intoAcademySoftwareFoundation:mainfrom
cozdas wants to merge 5 commits intoAcademySoftwareFoundation:mainfrom
Conversation
…hat the debugger can locate the run-time dependencies. This makes it possible to compile and launch the projects directly within visual studio for example. - Calling the above function in projects that need it. Signed-off-by: cuneyt.ozdas <cuneyt.ozdas@autodesk.com>
Signed-off-by: cuneyt.ozdas <cuneyt.ozdas@autodesk.com>
Signed-off-by: cuneyt.ozdas <cuneyt.ozdas@autodesk.com>
…structure. OCIO library files and the test files are separately grouped for better clarity. Signed-off-by: cuneyt.ozdas <cuneyt.ozdas@autodesk.com>
Signed-off-by: cuneyt.ozdas <cuneyt.ozdas@autodesk.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR currently targets Visual Studio but can be extended to support other platforms if they suffer from the same issue.
The issue is, although the project dependencies tell the compiler and linker where to find the compile-time dependencies like header files or libraries, they do not help finding the run-time dependencies, such as OpenColorIO_2_X.dll if it's compiled as a shared library. This creates a friction while working on executable projects (such as ociomakeclf utility) because if you try to run/debug the project within Visual Studio debugger, the OpenColorIO dll that the ociomakeclf.exe depends on can't be found as they are compiled into separate folders. Glut and glew dlls can't be located either.
The only setup for locating the run-time dependencies we were doing was for the gpu tests with
set_tests_properties(test_gpu PROPERTIES ENVIRONMENT PATH=${NEW_PATH})code fragment.This makes CTest setup the Path env variable so that the DLLs can be located in run time during the tests but does not help with running test_gpu_exec within the IDE.
This PR is adding a utility CMake function
set_debugger_envwhich project CMake files can call. This function currently sets up theVS_DEBUGGER_ENVIRONMENTproperty so that the generated visual studio project files have the correct debugger environment settings to locate the dependencies.Above mentioned CTest path setting routine for the gpu test is also updated.